package cn.ligoo.dtu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.dtu.dao.CarInfoDao;
import cn.ligoo.dtu.domain.CarInfo;
import cn.ligoo.dtu.service.CarInfoService;

/**
 * @author Jin,QingHua
 * @version 2012-07-24 12:18:52
 */
@Service
public class CarInfoServiceImpl implements CarInfoService {

	@Resource
	private CarInfoDao carInfoDao;

	@Override
	public Integer createCarInfo(CarInfo t) {
		this.carInfoDao.insertEntity(t);
		return t.getId();
	}

	@Override
	public int modifyCarInfo(CarInfo t) {
		return this.carInfoDao.updateEntity(t);
	}

	@Override
	public int removeCarInfo(CarInfo t) {
		return this.carInfoDao.deleteEntity(t);
	}

	@Override
	public CarInfo getCarInfo(CarInfo t) {
		return this.carInfoDao.selectEntity(t);
	}

	@Override
	public Integer getCarInfoCount(CarInfo t) {
		return this.carInfoDao.selectEntityCount(t);
	}

	@Override
	public List<CarInfo> getCarInfoList(CarInfo t) {
		return this.carInfoDao.selectEntityList(t);
	}

}
